<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%String path = request.getContextPath() ;%>
<%@ taglib uri="/WEB-INF/tld/c.tld" prefix="c" %> 
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
 <meta name="renderer" content="webkit">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>查看付款情况</title>
<jsp:include page="../../import.jsp" flush="true" />
</head>

<script type="text/javascript">
	var id='${id}';
	var data = '${listPage}';
	var grid = null;
	$(function () {
		initGrid();//grid
	});
	
	//初始化列表
	function initGrid(){
		var params = {};
		$("#grid").ligerGrid({
		    data: JSON.parse('${listPage}'),
	        columns: [
				{display: '支付表', name: 'paySchNo', width: 200,align: 'left',},
	            { display: '期数', name: 'payPd', minWidth: 140,
	        	 	render: function (rowdata, rowindex, value, column) { 
	            		var h = '';
	            		if(value!=0){
	            			h=value;
	            		}
	                        return h;
	            		}
	            },
	            { display: '应收类型', name: 'feeTypCdNm', minWidth: 200 ,
	        	 	render: function (rowdata, rowindex, value, column) { 
	            		var h = '';
	            		if(rowdata.payPd!=0){
	            			h+="第"+rowdata.payPd+"期"+value;
	            		}else{
	            			h = value;
	            		}
	                        return h;
	            		},
	            	enabledSort:true},
	            { display: '应还款时间', name: 'payDt', minWidth: 140,render:renderDate,enabledSort:true},
	            { display: '应收款合计', name: 'feeAmt', minWidth: 80 , enabledSort:true},
	            { display: '实际付款合计', name: 'paidUpAmt', minWidth: 80 ,
	             	render: function (rowdata, rowindex, value, column) { 
	            		var h = value/100;
	                     return h;
	            		},
	            	enabledSort:true}
	        ],
	        pageSize:100,
	        root:'rows',
	        record:'total',
	        hideLoadButton : true,
	        width: '100%',
	        height:'100%',
	        heightDiff:-2,
	        checkbox:true,
	        allowUnSelectRow: true,
            alternatingRow: false,
	        rownumbers:true,
	        enabledEdit: false,
	        usePagerOnLessPagesize: false,
	        groupColumnName:'paySchNo',
            groupColumnDisplay:'支付表号',
	    });
		grid = liger.get("grid");
		grid.setHeight(500);
		
	}
	//格式化为人民币格式
	function renderAmt(rowdata, rowindex, value) {
        var h="￥" + FormatMoney(value);
        return h;
    }

	//格式化时间
	function renderDate(rowdata, index, value){
		var dateStr = "";
		if(null != value&&value!=''){
			var date = new Date(value);
			dateStr = DateUtils.formatDate(date, DateUtils.YYYY_MM_DD);
		}
		return dateStr;
	}
	

	function iframeResize () {
	    if (parent.mainApp) {
	        parent.mainApp.parentTab.onResize();
	    };
	}
</script>

<body class="iframeBody">
	<div class="Wrapper">
        <div>
           <div id="pageInTab" class="pageInTab">
              <form id="formSet1">
	         	<div class="fieldset1 tabel_col clearFix">
					<div id="grid" class="sq-grid"></div>
				</div>
		      </form> 
			</div>
	</div>
		</div>
			</div>
</body>
</html>